import {API} from '@/api/index'

export const GetAllDictApi = () => {
    return API('/dict/queryAll', {}, 'POST', '')
}

export const AddDictApi = (codeId, dictId, dictName, dictLabel, dictGroup) => {
    return API('/dict/addDict', {codeId, dictId, dictName, dictLabel, dictGroup}, 'POST', '')
}

export const DeleteDictApi = (dictId, isRole) => {
    return API('/dict/deleteDict/' + dictId + '/' + isRole, {}, 'DELETE', '')
}

export const queryDictApi = (dictCreateTime, dictGroup, dictName) => {
    return API('/dict/queryDict', {dictCreateTime, dictGroup, dictName}, 'POST', '')
}

export const changeDictApi = (codeId, dictId, dictName, dictLabel, dictGroup) => {
    return API('/dict/updateDict', {codeId, dictId, dictName, dictLabel, dictGroup}, 'POST', '')
}

export const lookUpDictionaryApi = (dictId) => {
    return API('/dict/translateDict', {dictId}, "POST", 'PARAM')
}